Skip to content

[TM-2139[ add centroids to site polygons #205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 19, 2025

Conversation

egrojMonroy
Copy link
Collaborator

add centroid and polygonUuid to site polygon Dto

@@ -1,4 +1,4 @@
import { populateDto } from "@terramatch-microservices/common/dto/json-api-attributes";
import { populateDto, AdditionalProps } from "@terramatch-microservices/common/dto/json-api-attributes";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AdditionalProps is not being used, you can remove it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Scriptmatico
Scriptmatico previously approved these changes Jun 18, 2025
[literal("ST_Y(ST_Centroid(geom))"), "centroidLatitude"],
[literal("ST_X(ST_Centroid(geom))"), "centroidLongitude"]
],
required: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to mean that if a site doesn't have an associated polygon, it won't be returned at all. Is that the desired behavior?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, at first I thought I should be like that, nonetheless I removed because even though it should be joined to a geometry, it should return the data anyway.

@egrojMonroy egrojMonroy requested a review from roguenet June 19, 2025 16:38
@egrojMonroy egrojMonroy merged commit b7c1393 into staging Jun 19, 2025
1 of 2 checks passed
@egrojMonroy egrojMonroy deleted the feat/TM-2139-add-centroids-to-site-polygons branch June 19, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants